Release 10.1A: OpenEdge Development:
Internationalizing Applications
Unicode application example
Creating and running an application that uses Unicode is not difficult. The following is an example of creating and running an application consisting of a database server, a graphical client, and a UTF-8 database.
![]()
To create the application:
- Convert the database to Unicode using one of the techniques in the "Using Unicode with OpenEdge databases" section.
- Design queries that access only records that use the client’s code page.
One way to do this is for tables to have a field indicating the record’s code page. When records are added, the field is populated. When the database is queried, the query references the code page field to return only those records in the client’s code page.
Imagine that in the Sports database, the Customer table has a field,
db-language, indicating the code page or language of the record. A client whose language corresponds to the value of the variableuser-languagemight submit a query like the following:
- Start an OpenEdge database server, setting the server’s code page to UTF-8. The following command fragment illustrates this:
- Start a client in the native code page (perhaps ISO8859-15). Set
-cpinternal,-cpstream, and the other code-page-related startup parameters to this code page. The following command illustrates this:
Your Unicode application is up and running.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |